home *** CD-ROM | disk | FTP | other *** search
/ Aminet 39 / Aminet 39 (2000)(Schatztruhe)[!][Oct 2000].iso / Aminet / misc / emu / flamingo.lha / Flamingo / sources / aga-delta.asm next >
Encoding:
Assembly Source File  |  2000-07-21  |  11.6 KB  |  709 lines

  1. ; AGA-Delta
  2. ; External Video Driver for
  3. ; Flaming Plus/4 emulator for the Amiga
  4. ;
  5. ; version 1.2
  6.  
  7.     MACHINE    68020
  8.  
  9.         INCDIR    Include:
  10.  
  11.     INCLUDE exec/types.i
  12.     INCLUDE    exec/memory.i
  13.     INCLUDE    exec/exec_lib.i
  14.     INCLUDE    utility/tagitem.i
  15.     INCLUDE    intuition/intuition.i
  16.     INCLUDE    intuition/intuition_lib.i
  17.     INCLUDE    intuition/screens.i
  18.     INCLUDE    graphics/graphics_lib.i
  19.     INCLUDE graphics/modeid.i
  20.     INCLUDE    graphics/rastport.i
  21.     INCLUDE    dos/dos.i
  22.     INCLUDE    dos/dos_lib.i
  23.     INCLUDE    libraries/asl.i
  24.     INCLUDE    libraries/asl_lib.i
  25.     INCLUDE    macros.i
  26.  
  27. ;*** Handler structure
  28.  
  29.  STRUCTURE vxd_handler,0
  30.   LONG intuibase
  31.   LONG graphbase
  32.   LONG dosbase
  33.   LONG aslbase
  34.   LONG myscr
  35.   LONG mywin
  36.   LONG planes
  37.   WORD xsize
  38.   WORD ysize
  39.   LONG chunkysize
  40.   LONG palette
  41.   LONG palette32
  42.   LONG emuscr
  43.   LONG delta
  44.   LONG scrmodereq
  45.   LONG screendim
  46.   WORD bytesperrow
  47.  LABEL    vxd_handler_SIZEOF
  48.  
  49.  STRUCTURE c2p,4
  50.   LONG C2PChunkyBufferAddress
  51.   LONG C2PDeltaBufferAddress
  52.   LONG C2PPlanarBufferAddress
  53.   LONG C2PChunkyBufferWidth
  54.   LONG C2PChunkyBufferWidthDiv8
  55.   LONG C2PChunkyBufferHeight
  56.   LONG C2PChunkyBufferSize
  57.   LONG C2PBitplaneByteWidth
  58.  LABEL c2p_SIZEOF
  59.  
  60. JSRLIB    MACRO
  61.     jsr    _LVO\1(a6)
  62.     ENDM
  63.  
  64. ;*** Let's begin
  65.  
  66.     moveq.l    #0,d0
  67.     rts
  68.  
  69.     dc.b "FLAMINGOXVD"
  70.     dc.b "2"
  71.  
  72.     dc.l Name
  73.     dc.l Author
  74.     dc.w 1
  75.     dc.w 2
  76.  
  77.     dc.l drv_Init
  78.     dc.l drv_Done
  79.     dc.l drv_Configure
  80.     dc.l drv_OpenScreen
  81.     dc.l drv_CloseScreen
  82.     dc.l drv_Refresh
  83.     dc.l 0
  84.  
  85. Name:    dc.b    "AGA-Delta External Video Driver",0
  86. Author:    dc.b    "Álmos Rajnai (original C2P by Ferenc Zavacki)",0
  87.  
  88.     EVEN
  89.  
  90. ;*** Functions
  91.  
  92. drv_Init:
  93.     movem.l    a0-a1,-(sp)    ;Saving infos
  94.     move.l  4.w,a6        ;Alloc memory for handler
  95.     move.l    #MEMF_PUBLIC|MEMF_CLEAR,d1
  96.     move.l    #vxd_handler_SIZEOF,d0
  97.     JSRLIB    AllocVec
  98.     movem.l    (sp)+,a0-a1    ;Recover infos
  99.         tst.l    d0
  100.     beq.b    .1        ;No mem
  101.     movea.l    d0,a2
  102.         move.l    (a0),graphbase(a2)    ;Saving graphics.library base
  103.         move.l    4(a0),dosbase(a2)    ;Saving dos.library base
  104.         move.l    8(a0),intuibase(a2)    ;Saving intuition.library base
  105.         move.l    16(a0),aslbase(a2)    ;Saving asl.library base
  106.         movem.l    d0,-(sp)
  107.  
  108.     move.l    dosbase(a2),a6        ;Reading config file
  109.     move.l    #configfile,d1        ;Config file is pretty simple:
  110.     move.l    #MODE_OLDFILE,d2    ;only a screenmode number
  111.     JSRLIB    Open
  112.     tst.l    d0
  113.     beq.b    .2            ;Failed open
  114.     move.l    d0,d1
  115.     move.l    (sp),a0
  116.     lea    screendim(a0),a0
  117.     move.l    a0,d2
  118.     moveq.l    #4,d3
  119.     movem.l    d0,-(sp)
  120.     JSRLIB    Read            ;Reading the 4 bytes
  121.     cmp.l    #4,d0
  122.     beq.b    .3
  123.     move.l    (sp),a0            ;Failed: set 0 instead garbage
  124.     move.l    #0,screendim(a0)
  125.  
  126. .3    movem.l    (sp)+,d1
  127.     JSRLIB    Close
  128.  
  129. .2    movem.l    (sp)+,d0
  130. .1    move.l    #err_nomem,d1        ;Ignored, if d0 not 0
  131.     rts                ;Result in d0 available for now
  132.  
  133. drv_Done:
  134.     movea.l    a0,a1
  135.     cmpa.l    #0,a1
  136.     beq.b    .1
  137.     move.l    4.w,a6
  138.     JSRLIB    FreeVec        ;Deallocate handler
  139. .1
  140.     rts
  141.  
  142. drv_Configure:            ;Configure
  143.                 ;A simple screenmode requester appears
  144.     movem.l    a0,-(sp)
  145.     move.l    screendim(a0),displayid
  146.     move.l    #ASL_ScreenModeRequest,d0    
  147.     move.l    aslbase(a0),a6
  148.     lea    asltags,a0
  149.     JSRLIB    AllocAslRequest
  150.     move.l    (sp),a0
  151.     move.l    d0,scrmodereq(a0)
  152.     tst.l    d0
  153.     bne.b    config2
  154.     move.l    intuibase(a0),a6
  155.     JSRLIB    DisplayBeep
  156.     lea    4(sp),sp
  157.     rts
  158.  
  159. config2:
  160.     move.l    d0,a0
  161.     suba.l    a1,a1
  162.     JSRLIB    AslRequest
  163.     tst.l    d0
  164.     beq.b    .1
  165.  
  166.     move.l    (sp),a1
  167.     move.l    scrmodereq(a1),a0
  168.     move.l    sm_DisplayID(a0),screendim(a1)
  169.  
  170.     move.l    dosbase(a1),a6        ;Writing config file
  171.     move.l    #configfile,d1        ;Config file is pretty simple:
  172.     move.l    #MODE_NEWFILE,d2    ;only a screenmode number
  173.     JSRLIB    Open
  174.     tst.l    d0
  175.     beq.b    .1            ;Failed open
  176.     move.l    d0,d1
  177.     move.l    (sp),a0
  178.     lea    screendim(a0),a0
  179.     move.l    a0,d2
  180.     moveq.l    #4,d3
  181.     movem.l    d0,-(sp)
  182.     JSRLIB    Write            ;Writing the 4 bytes
  183.  
  184.     movem.l    (sp)+,d1        ;We don't care too much on
  185.     JSRLIB    Close            ;success...
  186.  
  187. .1    movem.l    (sp)+,a0
  188.     move.l    aslbase(a0),a6
  189.     move.l    scrmodereq(a0),a0
  190.     JSRLIB    FreeAslRequest
  191.     rts
  192.  
  193. drv_OpenScreen:
  194.     movea.l a0,a5
  195.     move.w    (a1)+,xsize(a5)
  196.     move.w    (a1)+,ysize(a5)
  197.     move.l    (a1)+,palette(a5)
  198.     move.l    screendim(a5),screenmode    ;screenmode from init
  199.  
  200.     moveq.l    #0,d0
  201.     move.l    d0,d1
  202.     move.w    xsize(a5),d0
  203.     move.w    ysize(a5),d1
  204.     mulu.w    d1,d0
  205.     move.l    d0,chunkysize(a5)
  206.     move.l    #MEMF_PUBLIC|MEMF_CLEAR,d1
  207.     move.l    4.w,a6
  208.     JSRLIB    AllocVec
  209.     move.l    d0,emuscr(a5)        ;allocating emulator screen
  210.     tst.l    d0
  211.     beq.w    .1
  212.  
  213.     move.l    chunkysize(a5),d0
  214.     move.l    #MEMF_PUBLIC|MEMF_CLEAR,d1
  215.     move.l    4.w,a6
  216.     JSRLIB    AllocVec
  217.     move.l    d0,delta(a5)        ;allocating delta buffer
  218.     tst.l    d0
  219.     beq.w    .1
  220.  
  221.     move.l    #MEMF_PUBLIC,d1
  222.     move.l    #128*3*4+4+16,d0
  223.     JSRLIB    AllocVec
  224.     move.l    d0,palette32(a5)    ;Convert palette to 32 bit per gun
  225.     beq.w    .1
  226.     movea.l    d0,a0
  227.         move.l    palette(a5),a1
  228.     move.w    #128,(a0)+
  229.     move.w    #$0,(a0)+
  230.     move.l    #128*3-1,d2
  231. .2    moveq.l    #0,d0
  232.     move.b    (a1)+,d0
  233.     swap    d0
  234.     asl.l    #8,d0
  235.     move.l    d0,(a0)+
  236.     dbf    d2,.2
  237.     move.l    #0,(a0)+
  238.     move.l    #0,(a0)+
  239.     move.l    #0,(a0)+
  240.     move.l    #0,(a0)+
  241.     move.w    xsize(a5),width+2
  242.     move.w    ysize(a5),height+2
  243.     move.l    palette32(a5),pal
  244.  
  245.         suba.l    a0,a0            ;No newscreen stuct
  246.         lea    scrtags,a1
  247.     movea.l    intuibase(a5),a6
  248.     JSRLIB    OpenScreenTagList
  249.     move.l    d0,myscr(a5)
  250.     beq.w    .1
  251.     move.l    d0,wscr
  252.     move.l    d0,a0
  253.     lea    sc_RastPort(a0),a0
  254.     movea.l    rp_BitMap(a0),a0
  255.     move.l    #BMA_FLAGS,d1
  256.     movea.l    graphbase(a5),a6
  257.     JSRLIB    GetBitMapAttr
  258.     and.l    #BMF_STANDARD|BMF_INTERLEAVED,d0
  259.     cmp.l    #BMF_STANDARD|BMF_INTERLEAVED,d0
  260.     beq.b    .3
  261.     movea.l    intuibase(a5),a6
  262.     move.l    myscr(a5),a0
  263.     JSRLIB    CloseScreen
  264.     moveq.l    #0,d0
  265.     move.l    d0,myscr(a5)
  266.     bra.b    .1
  267.  
  268. .3    move.w    xsize(a5),wwidth+2
  269.     move.w    ysize(a5),wheight+2
  270.     suba.l    a0,a0
  271.     lea    wintags,a1
  272.     movea.l    intuibase(a5),a6
  273.     JSRLIB    OpenWindowTagList
  274.     move.l    d0,mywin(a5)
  275.     beq.b    .1
  276.     movea.l    d0,a1
  277.     move.l  wd_RPort(a1),a0
  278.     move.l    rp_BitMap(a0),a0
  279.     move.l    bm_Planes(a0),planes(a5)
  280.     move.w    bm_BytesPerRow(a0),d0
  281.     and.l    #$ffff,d0
  282.     moveq.l    #7,d1
  283.     divu.w    d1,d0
  284.     move.w    d0,bytesperrow(a5)
  285.     move.l  wd_UserPort(a1),d0    ;IDCMP port
  286.     move.l    emuscr(a5),d2        ;chunky buffer
  287.  
  288. .1    move.l    #err_noscr,d1
  289.     moveq.l    #0,d3            ;no chunky modulo
  290.     rts
  291.  
  292. drv_CloseScreen:
  293.     move.l    a0,a5
  294.     move.l    intuibase(a5),a6
  295.     move.l    mywin(a5),a0
  296.     cmpa.l    #0,a0
  297.     beq.b    .1
  298.     JSRLIB    CloseWindow
  299.  
  300. .1    move.l    myscr(a5),a0
  301.     cmpa.l    #0,a0
  302.     beq.b    .2
  303.     JSRLIB    CloseScreen
  304.  
  305. .2    movea.l    palette32(a5),a1
  306.         cmpa.l    #0,a1
  307.     beq.b    .3
  308.     move.l    4.w,a6
  309.     JSRLIB    FreeVec        ;Deallocate translated palette
  310.  
  311. .3    movea.l    emuscr(a5),a1
  312.         cmpa.l    #0,a1
  313.     beq.b    .5
  314.     move.l    4.w,a6
  315.     JSRLIB    FreeVec        ;Deallocate chunky buffer
  316.  
  317. .5    movea.l    delta(a5),a1
  318.         cmpa.l    #0,a1
  319.     beq.b    .4
  320.     move.l    4.w,a6
  321.     JSRLIB    FreeVec        ;Deallocate delta buffer
  322.  
  323. .4    moveq.l    #0,d0
  324.     move.l    d0,emuscr(a5)    ;They were already freed
  325.     move.l    d0,delta(a5)
  326.     move.l    d0,palette32(a5)
  327.     move.l    d0,myscr(a5)
  328.     move.l    d0,mywin(a5)
  329.  
  330.     rts
  331.  
  332. drv_Refresh:
  333.     suba.l    #c2p_SIZEOF,a7        ;Storing all data on stack
  334.  
  335.     move.l    (emuscr,a0),(C2PChunkyBufferAddress,a7)
  336.     move.l    (delta,a0),(C2PDeltaBufferAddress,a7)
  337.     move.l    (planes,a0),(C2PPlanarBufferAddress,a7)
  338.     move.l    (delta,a0),(emuscr,a0)            ;exchange chunky and
  339.     move.l    (C2PChunkyBufferAddress,a7),(delta,a0)    ;delta buffer
  340.  
  341.     moveq.l    #0,d0
  342.     move.w    (xsize,a0),d0
  343.     move.l    d0,(C2PChunkyBufferWidth,a7)
  344.     lsr.l    #3,d0
  345.     move.l    d0,(C2PChunkyBufferWidthDiv8,a7)
  346.     move.w    (ysize,a0),d0
  347.     move.l    d0,(C2PChunkyBufferHeight,a7)
  348.     move.w    (bytesperrow,a0),d0
  349.     move.l    d0,(C2PBitplaneByteWidth,a7)
  350.     move.l    (chunkysize,a0),(C2PChunkyBufferSize,a7)
  351.  
  352.         move.l  (C2PChunkyBufferAddress,a7),a0
  353.     move.l    (C2PDeltaBufferAddress,a7),a1
  354.         move.l  (C2PChunkyBufferSize,a7),d0
  355.         lea     (a0,d0.L),a3
  356.  
  357.         move.l  (C2PPlanarBufferAddress,a7),a2
  358.  
  359.         move.l  (C2PBitplaneByteWidth,a7),D7
  360.  
  361. .12    move.l    (C2PChunkyBufferWidth,a7),d6
  362.     lsr.l    #5,d6
  363.  
  364. .11    cmp.l    (a0)+,(a1)+
  365.     bne.b    .1
  366.     cmp.l    (a0)+,(a1)+
  367.     bne.b    .2
  368.     cmp.l    (a0)+,(a1)+
  369.     bne.b    .3
  370.     cmp.l    (a0)+,(a1)+
  371.     bne.b    .4
  372.     cmp.l    (a0)+,(a1)+
  373.     bne.b    .5
  374.     cmp.l    (a0)+,(a1)+
  375.     bne.b    .6
  376.     cmp.l    (a0)+,(a1)+
  377.     bne.b    .7
  378.     cmp.l    (a0)+,(a1)+
  379.     bne.b    .8
  380.  
  381. .10    addq.l    #4,a2
  382.  
  383.     subq.l    #1,d6
  384.     bne.b    .11
  385.  
  386.     suba.l    (C2PChunkyBufferWidthDiv8,a7),a2
  387.     lea    (a2,d7.l*8),a2
  388.     sub.l    d7,a2
  389.  
  390.     cmp.l    a0,a3
  391.     bne.b    .12
  392.  
  393.  
  394.     move.l    C2PDeltaBufferAddress(a7),d0    ;giving back chunky buffer
  395.         adda.l    #c2p_SIZEOF,a7            ;changed to delta buffer
  396.     
  397.         rts
  398.  
  399. .1    subq.l    #1*4,a0
  400.     add.l    #7*4,a1
  401.     bra.b    .9
  402.  
  403. .2    subq.l    #2*4,a0
  404.     add.l    #6*4,a1
  405.     bra.b    .9
  406.  
  407. .3    sub.l    #3*4,a0
  408.     add.l    #5*4,a1
  409.     bra.b    .9
  410.  
  411. .4    sub.l    #4*4,a0
  412.     add.l    #4*4,a1
  413.     bra.b    .9
  414.  
  415. .5    sub.l    #5*4,a0
  416.     add.l    #3*4,a1
  417.     bra.b    .9
  418.  
  419. .6    sub.l    #6*4,a0
  420.     addq.l    #2*4,a1
  421.     bra.b    .9
  422.  
  423. .7    sub.l    #7*4,a0
  424.     addq.l    #1*4,a1
  425.     bra.b    .9
  426.  
  427. .8    sub.l    #8*4,a0
  428.     add.l    #0*4,a1
  429.  
  430. .9    move.l    #$0F0F0F0F,d5
  431.  
  432.     move.l    (a0)+,d0
  433.     and.l    d5,d0
  434.     lsl.l    #4,d0
  435.     move.l    (a0)+,d1
  436.     and.l    d5,d1
  437.     or.l    d1,d0
  438.  
  439.     move.l    (a0)+,d1
  440.     and.l    d5,d1
  441.     lsl.l    #4,d1
  442.     move.l    (a0)+,d2
  443.     and.l    d5,d2
  444.     or.l    d2,d1
  445.  
  446.     move.l    (a0)+,d2
  447.     and.l    d5,d2
  448.     lsl.l    #4,d2
  449.     move.l    (a0)+,d3
  450.     and.l    d5,d3
  451.     or.l    d3,d2
  452.  
  453.     move.l    (a0)+,d3
  454.     and.l    d5,d3
  455.     lsl.l    #4,d3
  456.     move.l    (a0)+,d4
  457.     and.l    d5,d4
  458.     or.l    d4,d3
  459.  
  460.     move.w    d2,d4
  461.     move.w    d0,d2
  462.     swap    d2
  463.     move.w    d2,d0
  464.     move.w    d4,d2
  465.  
  466.     move.w    d3,d4
  467.     move.w    d1,d3
  468.     swap    d3
  469.     move.w    d3,d1
  470.     move.w    d4,d3
  471.  
  472.     move.l    #$00FF00FF,d5
  473.  
  474.     move.l    d1,d4
  475.     lsr.l    #8,d4
  476.     eor.l    d0,d4
  477.     and.l    d5,d4
  478.     eor.l    d4,d0
  479.     lsl.l    #8,d4
  480.     eor.l    d4,d1
  481.  
  482.     move.l    d3,d4
  483.     lsr.l    #8,d4
  484.     eor.l    d2,d4
  485.     and.l    d5,d4
  486.     eor.l    d4,d2
  487.     lsl.l    #8,d4
  488.     eor.l    d4,d3
  489.  
  490.     move.l    #$33333333,d5
  491.  
  492.     move.l    d2,d4
  493.     lsr.l    #2,d4
  494.     eor.l    d0,d4
  495.     and.l    d5,d4
  496.     eor.l    d4,d0
  497.     lsl.l    #2,d4
  498.     eor.l    d4,d2
  499.  
  500.     move.l    d3,d4
  501.     lsr.l    #2,d4
  502.     eor.l    d1,d4
  503.     and.l    d5,d4
  504.     eor.l    d4,d1
  505.     lsl.l    #2,d4
  506.     eor.l    d4,d3
  507.  
  508.     move.l    #$55555555,d5
  509.  
  510.     move.l    d1,d4
  511.     lsr.l    #1,d4
  512.     eor.l    d0,d4
  513.     and.l    d5,d4
  514.     eor.l    d4,d0
  515.     lsl.l    #1,d4
  516.     eor.l    d4,d1
  517.  
  518.     move.l    d1,(a2,d7.l*2)
  519.  
  520.     move.l    d3,d4
  521.     lsr.l    #1,d4
  522.     eor.l    d2,d4
  523.     and.l    d5,d4
  524.     eor.l    d4,d2
  525.     lsl.l    #1,d4
  526.     eor.l    d4,d3
  527.  
  528.     move.l    d0,a4
  529.     move.l    d2,a5
  530.     move.l    d3,a6
  531.  
  532.     sub.l    #8*4,a0
  533.  
  534.     move.l    #$F0F0F0F0,d5
  535.  
  536.     move.l    (a0)+,d0
  537.     and.l    d5,d0
  538.     move.l    (a0)+,d1
  539.     and.l    d5,d1
  540.     lsr.l    #4,d1
  541.     or.l    d1,d0
  542.  
  543.     move.l    (a0)+,d1
  544.     and.l    d5,d1
  545.     move.l    (a0)+,d2
  546.     and.l    d5,d2
  547.     lsr.l    #4,d2
  548.     or.l    d2,d1
  549.  
  550.     move.l    (a0)+,d2
  551.     and.l    d5,d2
  552.     move.l    (a0)+,d3
  553.     and.l    d5,d3
  554.     lsr.l    #4,d3
  555.     or.l    d3,d2
  556.  
  557.     move.l    (a0)+,d3
  558.     and.l    d5,d3
  559.     move.l    (a0)+,d4
  560.     and.l    d5,d4
  561.     lsr.l    #4,d4
  562.     or.l    d4,d3
  563.  
  564.     move.l    a6,(a2)
  565.  
  566.     move.w    d2,d4
  567.     move.w    d0,d2
  568.     swap    d2
  569.     move.w    d2,d0
  570.     move.w    d4,d2
  571.  
  572.     move.w    d3,d4
  573.     move.w    d1,d3
  574.     swap    d3
  575.     move.w    d3,d1
  576.     move.w    d4,d3
  577.  
  578.     move.l    #$00FF00FF,d5
  579.  
  580.     move.l    d1,d4
  581.     lsr.l    #8,d4
  582.     eor.l    d0,d4
  583.     and.l    d5,d4
  584.     eor.l    d4,d0
  585.     lsl.l    #8,d4
  586.     eor.l    d4,d1
  587.  
  588.     move.l    a5,(a2,d7.l)
  589.  
  590.     move.l    d3,d4
  591.     lsr.l    #8,d4
  592.     eor.l    d2,d4
  593.     and.l    d5,d4
  594.     eor.l    d4,d2
  595.     lsl.l    #8,d4
  596.     eor.l    d4,d3
  597.  
  598.     move.l    #$33333333,d5
  599.  
  600.     move.l    d2,d4
  601.     lsr.l    #2,d4
  602.     eor.l    d0,d4
  603.     and.l    d5,d4
  604.     eor.l    d4,d0
  605.     lsl.l    #2,d4
  606.     eor.l    d4,d2
  607.  
  608.     add.l    d7,a2
  609.     move.l    a4,(a2,d7.l*2)
  610.     sub.l    d7,a2
  611.  
  612.     move.l    d3,d4
  613.     lsr.l    #2,d4
  614.     eor.l    d1,d4
  615.     and.l    d5,d4
  616.     eor.l    d4,d1
  617.     lsl.l    #2,d4
  618.     eor.l    d4,d3
  619.  
  620.     move.l    #$55555555,d5
  621.  
  622.     and.l    d5,d0
  623.     lsl.l    #1,d0
  624.     and.l    d5,d1
  625.     or.l    d0,d1
  626.  
  627.     lea    (a2,d7.l*4),a2
  628.     move.l    d1,(a2,d7.l*2)
  629.  
  630.     move.l    d3,d4
  631.     lsr.l    #1,d4
  632.     eor.l    d2,d4
  633.     and.l    d5,d4
  634.     eor.l    d4,d2
  635.     lsl.l    #1,d4
  636.     eor.l    d4,d3
  637.  
  638.     move.l    d3,(a2)
  639.     move.l    d2,(a2,d7.l)
  640.  
  641.     lsl.l    #2,d7
  642.     sub.l    d7,a2
  643.     lsr.l    #2,d7
  644.  
  645.     bra.w    .10
  646.  
  647.     EVEN
  648.  
  649. ;*** Constants
  650.  
  651. scrtags:
  652.     dc.l    SA_Width
  653. width:    dc.l    0
  654.     dc.l    SA_Height
  655. height:    dc.l    0
  656.     dc.l    SA_Depth,7
  657.     dc.l    SA_Colors32
  658. pal:    dc.l    0
  659.     dc.l    SA_Title,scrtitle
  660.     dc.l    SA_ShowTitle,FALSE
  661.     dc.l    SA_DisplayID
  662. screenmode:
  663.     dc.l    0
  664.     dc.l    SA_Interleaved,TRUE
  665.     dc.l    SA_Type,CUSTOMSCREEN
  666.     dc.l    SA_AutoScroll,TRUE
  667.     dc.l    SA_Overscan,OSCAN_STANDARD
  668.     dc.l    SA_Quiet,TRUE
  669.     dc.l    TAG_DONE
  670.  
  671. wintags:
  672.     dc.l    WA_Left,0
  673.     dc.l    WA_Top,0
  674.     dc.l    WA_Width
  675. wwidth:    dc.l    0
  676.     dc.l    WA_Height
  677. wheight:    dc.l    0
  678.     dc.l    WA_IDCMP,IDCMP_RAWKEY
  679.     dc.l    WA_Title,0
  680.     dc.l    WA_Backdrop,TRUE
  681.     dc.l    WA_RMBTrap,TRUE
  682.     dc.l    WA_Borderless,TRUE
  683.     dc.l    WA_NoCareRefresh,TRUE
  684.     dc.l    WA_CustomScreen
  685. wscr:    dc.l    0
  686.     dc.l    WA_SimpleRefresh,TRUE
  687.     dc.l    WA_Activate,TRUE
  688.     dc.l    TAG_DONE
  689.  
  690. asltags:
  691.     dc.l    ASLSM_TitleText,configwintxt
  692.     dc.l    ASLSM_InitialDisplayID
  693. displayid:
  694.     dc.l    0
  695.     dc.l    TAG_DONE
  696.  
  697. scrtitle:    dc.b    'Flamingo Plus/4 emulator screen',0
  698.  
  699. configwintxt:    dc.b    'Choose desired screenmode',0
  700.  
  701. configfile:    dc.b    'aga-delta.cfg',0
  702.  
  703. ;*** Errors
  704.  
  705. err_nomem:
  706.     dc.b    'Run out of memory',0
  707. err_noscr:
  708.     dc.b    'Cannot open screen',0
  709.